require('babel-register');

const program = require('commander');
const app = require('./app.js').default;

program
  .option('-h, --host [host]', 'service host', '0.0.0.0:60000')
  .parse(process.argv);

const parts = program.host.split(':');

app.listen(parts[1], parts[0], (err) => {
  if (err) {
    console.log(err);
    return;
  }
  console.log(`listening on ${program.host}`);
});

